// jishupu-admin-template样式
@import './variables.scss';

#jishupu {

  body {
    font-size: 14px;
    color:#{$color-text-regular};
  }

  .jsp-scroller {
    &::-webkit-scrollbar {
      width: 18px;
      height: 18px;
      background-color: #{$background-color-extra};
    }

    &::-webkit-scrollbar-thumb {
      height: 6px;
      border: 4px solid transparent;
      background-clip: padding-box;
      border-radius: 8px;
      background-color: rgba(0, 0, 0, .2);
      box-shadow: inset -1px -1px 0 rgb(0 0 0 / 5%), inset 1px 1px 0 rgb(0 0 0 / 5%);
    }
  }

  // 一套表单通用布局方案
  .form-box {
    .el-row {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }

    .el-form {

      //动态编辑tag标签
      .el-tag+.el-tag,
      .el-tag+.button-new-tag {
        margin-left: 10px;
      }

      .button-new-tag {
        height: 32px;
        line-height: 30px;
        padding-top: 0;
        padding-bottom: 0;
      }

      .input-new-tag {
        width: 90px;
        margin-left: 10px;
        vertical-align: bottom;
      }

      .el-select {
        display: block;
      }

      .el-date-editor {
        width: 100%;
      }

      .date-separate-time {}

      .el-cascader {
        display: block;
      }

      // 特殊处理表单中的tab选项面板：表单中嵌套其他tab组件时会影响所有tab样式
      .form-tabs {
        border-bottom: 0;

        .form-tabs-tab-pane {
          padding-top: 7px;
        }
      }

      .btn-row {
        background-color: #{$form-element-bg};
        padding-top: 21px;
        border: 1px solid #{$border-color-base};
        -webkit-box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 4%);
        box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 4%);
      }

      .el-alert {
        line-height: normal;
      }

      .el-autocomplete {
        display: block;
      }
    }
  }

  // 通用表格布局方案，包括搜索区、功能按钮区、表格区、分页区的布局
  .table-box {

    // 搜索区
    .search-box {
      padding-top: 12px;
      border-bottom: 1px solid #{$border-color-lighter};
      margin-bottom: 15px;

      .el-form {
        .el-col {
          min-height: 60px;
        }

        .el-select {
          display: block;
        }

        .el-date-editor {
          width: 100%;
        }

        .search-btn {
          text-align: right;
          word-wrap: break-word;
          word-break: normal;

          button {
            margin-bottom: 10px;
          }
        }
      }
    }

    // 按钮功能区
    .btn-box {
      margin-bottom: 10px;

      .btnfunction-section-col {
        display: flex;
        flex-flow: row wrap;

        >* {
          margin: 0 10px 10px 0;
        }
      }
    }

    // 表格区
    .el-table {
      .el-table__body-wrapper::-webkit-scrollbar {
        width: 20px;
        height: 18px;
      }

      .el-table__body-wrapper::-webkit-scrollbar-thumb {
        height: 6px;
        border: 5px solid transparent;
        background-clip: padding-box;
        border-radius: 8px;
        background-color: rgba(0, 0, 0, .2);
        box-shadow: inset -1px -1px 0 rgb(0 0 0 / 5%), inset 1px 1px 0 rgb(0 0 0 / 5%);
      }

      th {
        background-color: #{$table-td-bg};
      }

      td {
        .table-expand {
          padding-left: 20px;

          label {
            width: 90px;
            color: #99a9bf;
          }

          .el-form-item {
            margin-right: 0;
            margin-bottom: 0;
            width: 100%;
          }
        }

        .el-tag {
          margin-right: 5px;
        }

        .el-input-number--medium {
          width: 120px;
        }

        .el-link.el-link--primary {
          color: #337ab7;
        }

        .el-link.is-disabled {
          color: #c8c9cc;
        }
      }

      // 树形表格图标更换
      .menuIcon {
        .el-icon-arrow-right {
          &:before {
            content: '\f0fe';
            // 字体必须
            font-family: "Font Awesome 5 Free";
          }
        }

        .el-table__expand-icon--expanded {
          transform: rotate(180deg);

          .el-icon-arrow-right {
            &:before {
              content: '\f146';
            }
          }
        }

      }

      // 复选框不确定状态效果：jsp-is-indeterminate
      .jsp-is-indeterminate .el-checkbox__inner {
        background-color: #409EFF;
        border-color: #409EFF;
      }

      .jsp-is-indeterminate .el-checkbox__input .el-checkbox__inner::before {
        content: '';
        position: absolute;
        display: block;
        background-color: #FFF;
        height: 2px;
        -webkit-transform: scale(.5);
        transform: scale(.5);
        left: 0;
        right: 0;
        top: 5px;
      }

      .jsp-is-indeterminate .el-checkbox__input.is-checked .el-checkbox__inner::after {
        transform: none !important;
        -webkit-transform: none !important;
        transition: none !important;
        -webkit-transition: none !important;
        display: none !important;
      }

    }

  }

  // 自定义左侧el-tree结构菜单
  .customer-sidebar-el-tree {
    min-width: #{$sideBarWidth};
    background-color: #{$menuBg};
    padding: 0;
    min-width: 200px;
    color: #{$menuText};

    &:hover {
      background-color:#{$menuHover};
    }

    .el-icon-caret-right:before {
      content: "\f0fe";
      font-family: "Font Awesome 5 Free";
    }

    .el-tree-node__expand-icon.expanded {
      transform: rotate(180deg);

      &:before {
        content: '\f146';
      }
    }

    .el-tree-node__content {
      background-color: transparent;

      &:hover {
        background-color: transparent;

        .customer-tree-node span {
          color: #{$menuActiveText};
        }
      }

      .customer-tree-node {
        font-size: 14px;

        .el-menu-item {
          padding: 0 !important;
          width: auto !important;
          min-width: auto !important;
          height: 100% !important;
          line-height: 20px !important;
          background-color: transparent !important;

          &:hover {
            background-color: transparent !important;
          }
        }
      }
    }

    .is-current {
      >.el-tree-node__content .customer-tree-node {
        color: #{$color-primary};
      }
    }

    .el-tree-node {
      position: relative;
      padding-left: 15px;
    }

    .el-tree-node__children {
      padding-left: 15px;
    }

    .el-tree-node::before {
      content: "";
      height: 100%;
      width: 1px;
      position: absolute;
      left: -3px;
      top: -26px;
      border-width: 1px;
      border-left: 1px dashed #{$menuText};
    }

    .el-tree-node:last-child::before {
      height: 38px;
    }

    .el-tree-node::after {
      content: "";
      width: 13px;
      height: 20px;
      position: absolute;
      left: -3px;
      top: 12px;
      border-width: 1px;
      border-top: 1px dashed #{$menuText};
    }

    &>.el-tree-node::after {
      border-top: none;
    }

    &>.el-tree-node::before {
      border-left: none;
    }

    .el-tree-node__expand-icon {
      font-size: 16px;
      margin-right: 6px;
      &.is-leaf {
        color: transparent;
        display: none;
      }
    }

  }

  .nest-menu .customer-sidebar-el-tree {
    background-color: #{$subMenuBg};
    padding: 12px 25px;

    &:hover {
      background-color:#{$subMenuHover};
      cursor: pointer;
    }
  }

  .el-menu--vertical .nest-menu .customer-sidebar-el-tree {
    padding: 12px 0;
  }


  // 弹框样式通用通用
  .jsp-dialog-modal-box {
    width: 50%;
  }


  @media screen and (max-width: 480px) {

    // 表单
    .form-box {
      .el-form-item__label {
        width: auto !important;
        float: none !important;
      }

      .el-form-item__content {
        width: auto !important;
        margin-left: 0 !important;
      }
    }

    // 通用提示框
    .el-message-box {
      width: 90%!important;
    }

  }


  @media screen and (max-width: 1500px) {
    // 弹框样式通用通用
    .jsp-dialog-modal-box {
      width: 70%;
    }
  }

  @media screen and (max-width: 950px) {

    // 弹框样式通用通用
    .jsp-dialog-modal-box {
      width: 80%;
    }
  }

  @media screen and (max-width: 650px) {

    // 弹框样式通用通用
    .jsp-dialog-modal-box {
      width: 100%;
      margin-top: 0!important;
      height: 100%
    }
  }




}
